package com.zf.zffencheng.service;

import com.zf.zffencheng.model.Result;

/**
 * ClassName: SmsService <br/>
 * Description:  短信 <br/>
 * date: 2021/5/11 9:39<br/>
 *
 * @author william <br/>
 */
public interface SmsService {
    /**
     * sms_bucket + ":" + mobile
     */
    String SMS_BUCKET = "sms_bucket";
    String SMS_RICK_CONTROL_BUCKET = "sms_rick_control_bucket";

    String ALI_ACCESS_ID= "LTAICedjEqyl067L";
    String ALI_ACCESS_SECRET= "aGyaTa1ZasTvV52X9zVL0wYA8yLkbA";
    String ALI_SMS_DOMAIN= "dysmsapi.aliyuncs.com";
    String ALI_SMS_SIGN_NAME = "金蛹科技";
    String ALI_SMS_TEMPLATE = "SMS_172600385";
    //过期时间
    Long SMS_EXPIRE = 10L;
    //短信风控条数
    Long SMS_RICK_CONTROL = 10L;
    //分控条数过期时间
    Long SMS_RICK_CONTROL_TIME = 24L;
    /**
     * 校验手机号
     * @param mobile
     * @param code
     */
    void verifyCode(String mobile, String code);

    /**
     * 发送短信
     * @param mobile
     *
     * @return
     */
    Result send(String mobile, String code) throws Exception;
}
